package com.tutu.thymeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Program: SpringBoot
 * @Description: if/unless
 * @Author: JK.TuTu
 * @ @Version: 1.0
 * @Create: 2022-11-30 20:07
 **/

@Controller
@RequestMapping("test")
public class TestController04 {

    @GetMapping("if")
    public String test1(Model model) {
        model.addAttribute("isLogin", true);
        model.addAttribute("age", 30);
        model.addAttribute("name", "");
        model.addAttribute("sex","哈哈");
        return "demo08";

    }
}
